﻿using System.Collections.Generic;
namespace IFramework
{
    public class IFSMStateInfo
    {
        public IFSMState state { get; }
        public FSMStateType StateType { get; }
        public IFSMStateInfo(IFSMState state, FSMStateType StateType)
        {
            this.StateType = StateType;
            this.state = state;
            ConditionTransitions = new List<StateTransition>();
        }
        public List<StateTransition> ConditionTransitions { get; }
        public StateTransition AutoNextIStateTransition { get; private set; }
        public void SetConditionTransition(StateTransition stateTransition)
        {
            if (ConditionTransitions.Contains(stateTransition)) return;
            ConditionTransitions.Add(stateTransition);
        }
        public void SetAutoNextTransition(StateTransition stateTransition)
        {
            if (AutoNextIStateTransition != null)
                Log.E("ERR AutoNext isNot null ");
            AutoNextIStateTransition = stateTransition;
        }
    }
}